package com.shuetech.tmp;
import java.util.Properties;

import javax.naming.Context;
import javax.rmi.PortableRemoteObject;

import com.shuetech.ejb.GameRankingEngine.session.ELO.ELORemote;
import com.shuetech.ejb.GameRankingEngine.session.ELO.ELOInterfaceCommon.WhoWon;


public class Main {
	public static void main(String[] args) {
		try
		{
			Properties p = new Properties();
			p.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
			p.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
			p.put("java.naming.provider.url", "localhost");
			Context jndiContext = new javax.naming.InitialContext(p);
			Object ref = jndiContext.lookup("ELOBean/remote");
			ELORemote elo = (ELORemote)PortableRemoteObject.narrow(ref,ELORemote.class);

			double newScores[] = elo.getNewScoresDaysOfWonder(1500, 100, 1600, 100, false, false, WhoWon.PLAYER_A);

			System.out.println(newScores[0]);
			System.out.println(newScores[1]);

		}
		catch (javax.naming.NamingException ne)
		{
			ne.printStackTrace( );
		}
	}

	/* (non-Java-doc)
	 * @see java.lang.Object#Object()
	 */
	public Main() {
		super();
	}

}